package com.jwkj.collector.modbus.base;

/**
 * 功能码
 * Created by kaiping.wang on 2018/11/6.
 */
public enum ModbusFunction {
    /**
     * 01:单读线圈状态
     */
    ONE_READ((byte) 0x01),
    /**
     * 03:读保存寄存器
     */
    MULTI_READ((byte) 0x03),
    /**
     * 05:单写线圈状态
     */
    ONE_WRITE((byte) 0x05),
    /**
     * f0:写多线圈状态
     */
    MULTI_WRITE((byte) 0xf0);
    byte code;

    ModbusFunction(byte code) {
        this.code = code;
    }

    public byte getCode() {
        return this.code;
    }

}
